package us.mooresr.aircraftscheduling.server.guice;

import us.mooresr.aircraftscheduling.server.handler.CreateReservationHandler;
import us.mooresr.aircraftscheduling.server.handler.DeleteReservationHandler;
import us.mooresr.aircraftscheduling.server.handler.DeleteUserHandler;
import us.mooresr.aircraftscheduling.server.handler.GetAllReservationsHandler;
import us.mooresr.aircraftscheduling.server.handler.GetUserDetailHandler;
import us.mooresr.aircraftscheduling.server.handler.LoginHandler;
import us.mooresr.aircraftscheduling.server.handler.RetrieveAllOpenReservationsHandler;
import us.mooresr.aircraftscheduling.server.handler.RetrieveReservationHandler;
import us.mooresr.aircraftscheduling.server.handler.UpdateReservationHandler;
import us.mooresr.aircraftscheduling.server.handler.UpdateUserHandler;
import us.mooresr.aircraftscheduling.shared.action.CreateReservation;
import us.mooresr.aircraftscheduling.shared.action.CreateUserAction;
import us.mooresr.aircraftscheduling.shared.action.DeleteReservation;
import us.mooresr.aircraftscheduling.shared.action.DeleteUserAction;
import us.mooresr.aircraftscheduling.shared.action.GetAllReservations;
import us.mooresr.aircraftscheduling.shared.action.GetAllReservationsAction;
import us.mooresr.aircraftscheduling.shared.action.GetUserDetailAction;
import us.mooresr.aircraftscheduling.shared.action.RetrieveReservation;
import us.mooresr.aircraftscheduling.shared.action.UpdateReservation;
import us.mooresr.aircraftscheduling.shared.action.CreateReservationAction;
import us.mooresr.aircraftscheduling.shared.action.DeleteReservationAction;
import us.mooresr.aircraftscheduling.shared.action.LoginAction;
import us.mooresr.aircraftscheduling.shared.action.RetrieveAllOpenReservationsAction;
import us.mooresr.aircraftscheduling.shared.action.RetrieveReservationAction;
import us.mooresr.aircraftscheduling.shared.action.UpdateReservationAction;
import us.mooresr.aircraftscheduling.shared.action.UpdateUserAction;


import com.gwtplatform.dispatch.server.guice.HandlerModule;
import us.mooresr.aircraftscheduling.shared.action.GetUserList;
import us.mooresr.aircraftscheduling.server.handler.GetUserListActionHandler;
import us.mooresr.aircraftscheduling.shared.action.CreateUser;
import us.mooresr.aircraftscheduling.server.handler.CreateUserActionHandler;

/**
 * Defines mappings between Actions and Handlers.
 * For each Action created there should be an entry here saying which class handles that Action
 * 
 * @author christopher_moore
 *
 */

public class ServerModule extends HandlerModule {

	@Override
	protected void configureHandlers() {

		bindHandler(LoginAction.class, LoginHandler.class);
		bindHandler(CreateReservationAction.class, CreateReservationHandler.class);
		bindHandler(DeleteReservationAction.class, DeleteReservationHandler.class);
		bindHandler(RetrieveReservationAction.class, RetrieveReservationHandler.class);
		bindHandler(UpdateReservationAction.class, UpdateReservationHandler.class);
		bindHandler(RetrieveAllOpenReservationsAction.class, RetrieveAllOpenReservationsHandler.class);

		bindHandler(GetUserList.class, GetUserListActionHandler.class);

		bindHandler(CreateUserAction.class, CreateUserActionHandler.class);
		bindHandler(GetUserDetailAction.class, GetUserDetailHandler.class);
		bindHandler(UpdateUserAction.class, UpdateUserHandler.class);
		bindHandler(CreateReservationAction.class, CreateReservationHandler.class);
		bindHandler(DeleteUserAction.class, DeleteUserHandler.class);
		bindHandler(GetAllReservationsAction.class, GetAllReservationsHandler.class);
		
	}


}
